loadMsg();
function loadMsg() {
    var openid = localStorage.getItem("openid");
    if(openid == null){
        var code = location.href.split("&")[0].split("=")[1];
        if(code != null){
            $.ajax({
                type:"post",
                url:targetUrl+"/wechat114/oAuth",
                data:{"code": code},
                async: false,
                dataType:"json",
                success:function(data){
                    localStorage.setItem("openid", data.data);
                }
            })
        }
    }
}